<include file="Common:layout" />
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>授权管理</h3>
                <h5></h5>
            </div>
        </div>
    </div>
    <div id="explanation" class="explanation">
        <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
            <h4 title="提示相关设置操作时应注意的要点">授权提醒</h4>
            <span title="收起提示" id="explanationZoom"></span>
        </div>
        <ul>
            <li>下载的文件请先加密再发送使用方！加密地址：http://www.phpjm.net/encode.html</li>
        </ul>
    </div>
    <div class="flexigrid">
        <div class="mDiv">
            <div class="ftitle">
                <h3>授权列表</h3>
                <h5></h5>
            </div>

            <form action="" class="navbar-form form-inline" method="post" onsubmit="return false;">
                <div class="sDiv">
                    <div class="sDiv2">
                        <!--排序规则-->
                        <input type="text" size="30" id="key" placeholder="搜索词">
                        <input type="hidden" id="orderby1" value="auth_id"/>
                        <input type="hidden" id="orderby2" value="DESC"/>
                        <input type="button" class="btn" value="搜索" onclick="ajax_get_table(1);"/>
                    </div>
                </div>
            </form>
        </div>
        <div class="hDiv">
            <div class="hDivBox">
                <table cellspacing="0" cellpadding="0">
                    <thead>
                    <tr>
                        <th align="left" abbr="article_title" axis="col6">
                            <div style="text-align: center; width:50px;" class="">ID</div>
                        </th>
                        <th align="left" abbr="article_title" axis="col6">
                            <div style="text-align: center; width:65px;" class="">操作</div>
                        </th>
                        <th align="left" abbr="ac_id" axis="col4">
                            <div style="text-align: center; width: 180px;">授权公司</div>
                        </th>
                        <th align="center" abbr="ac_id" axis="col4">
                            <div style="text-align: center; width: 130px;" class="">域名</div>
                        </th>
                        <th align="center" abbr="article_show" axis="col6">
                            <div style="text-align: center; width: 100px;">IP</div>
                        </th>
                        <th align="center" abbr="article_time" axis="col6">
                            <div style="text-align: center; width: 100px;">到期时间</div>
                        </th>
                        <th align="center" abbr="article_time" axis="col6">
                            <div style="text-align: center; width: 80px;">加密字符</div>
                        </th>
                        <th align="center" abbr="article_time" axis="col6">
                            <div style="text-align: center; width: 240px;">授权码</div>
                        </th>
                        <th style="width:100%" axis="col7">
                            <div></div>
                        </th>
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div class="tDiv">
            <div class="tDiv2">
                <div class="fbutton">
                    <a href="{:U('Author/new_author')}">
                        <div class="add" title="添加授权">
                            <span><i class="fa fa-plus"></i>添加授权</span>
                        </div>
                    </a>
                </div>
            </div>
            <div style="clear:both"></div>
        </div>

        <div id="ajax_return"></div>
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function(){
        // ajax 加载商品列表
        ajax_get_table(1);

        // 刷选条件 鼠标 移动进去 移出 样式
        $(".hDivBox > table > thead > tr > th.mhover").mousemove(function(){
            $(this).addClass('thOver');
        }).mouseout(function(){
            $(this).removeClass('thOver');
        });
    });


    // ajax 抓取页面 form 为表单id  page 为当前第几页
    function ajax_get_table(page){
        cur_page = page; //当前页面 保存为全局变量
        $.ajax({
            type : "POST",
            url:"{:U('Author/ajax_auths_list')}",
            data : {
                p :page,
                expire :$("#expire").val(),
                stes :$("#stes").val(),
                key :$("#key").val(),
                orderby1 :$("#orderby1").val(),
                orderby2 :$("#orderby2").val()
            },
            success: function(data){
                $("#ajax_return").html('');
                $("#ajax_return").append(data);
            }
        });
    }
</script>
</body>
</html>